package cn.youruan.demo.service;


import cn.youruan.demo.domain.User;
import cn.youruan.demo.dto.UserDto;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface IUserService extends IService<User> {
    Integer selectHobbyCount(Long userId);

    void addHobbyRelation(Long userId, Long hobbyId);

    /**
     * 判断当前用户是否有爱好
     * @param userId
     * @return
     */
    boolean isHobby(Long userId);

    Long selectHobbyIdByUserId(Long userId);

    /**
     * 删除中间表关系
     * @param userId
     * @return
     */
    void deleteHobbyRelation(Long userId,Long hobbyId);

    boolean isFinishUserInfo(User user);

    List<UserDto> sortByHobbyMaxUser();

    List<User> sortByCount();
}
